#pragma once

namespace MOE
{
	namespace Core
	{

		// Defines commonly used types and enums.

		// Basic Types. May change per platform (not yet).

		// 8-bit signed integer.
		typedef char int8;
		// 8-bit unsigned integer.
		typedef unsigned char uint8;
		// 16-bit signed integer.
		typedef short int16;
		// 16-bit unsigned integer.
		typedef unsigned short uint16;
		// 32-bit signed integer.
		typedef int int32;
		// 32-bit unsigned integer.
		typedef unsigned int uint32;
		// 64-bit signed integer.
		typedef long long int64;
		// 64-bit unsigned integer.
		typedef unsigned long long uint64;

		// 32-bit floating point number.
		typedef float float32;
		// 64-bit floating point number.
		typedef double float64;

		// 8-bit character. Conceptually should be UTF-8 encoded.
		typedef int8 char8;
		// 16-bit character. Conceptually should be UTF-16 encoded.
		typedef int16 char16;
		// 32-bit character. Conceptually should be UTF-32 encoded.
		typedef int32 char32;

		// Commonly used types. Consistent through platforms.

		// Type used to represent all sizes in MOE::Core
		typedef uint32 tSize;

		// Type used for all hash values in MOE::Core
		typedef uint32 tHashValue;

		// Type used for all references in their raw, untyped form.
		typedef void* tUntypedRef;
		typedef const void* tUntypedConstRef;

		// Enum for all basic types.
		enum class BasicType
		{
			kNil,
			kInt8,
			kUint8,
			kInt16,
			kUint16,
			kInt32,
			kUint32,
			kInt64,
			kUint64,
			kFloat32,
			kFloat64,

			// Counter
			kNumBasicTypes,
		};

		// Enum for reference types.
		enum class ReferenceType
		{
			// Just value.
			kValue,

			// Reference / pointer.
			kReference,
		};

		// Enum for array types.
		enum class ArrayType
		{
			// Not array.
			kSingle,

			// Embedded, static-sized array.
			// Field with this type stores the array within the class.
			kEmbeddedArray,

			// Dynamic-sized array.
			// Field with this type only stores a reference to the array in the class.
			kRemoteArray,
		};

		extern const char* const kBasicTypeNames[BasicType::kNumBasicTypes];

	}
}